<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui"
	xmlns:pm="http://primefaces.org/mobile" contentType="text/html" renderKitId="PRIMEFACES_MOBILE">
	<pm:page title="Login" loadingMessage="Loading">
		<pm:view id="loginView">
			<pm:header title="Cooker" swatch="b">
				<f:facet name="right">
					<p:commandLink value="Logout" icon="back" action="#{cCookerAction.logout()}" />
				</f:facet>
			</pm:header>
			<pm:content>
				<h:form id="myForm">
					<p:dataList value="#{cCookerForm.cookerFoodBeans}" var="order" type="inset">
						<f:facet name="header">
							<h:outputText value="Orders" />
						</f:facet>
						<h:panelGrid columns="3">
							<p:selectBooleanCheckbox value="#{order.selected}" />
							<h:outputText value="#{order.foodName}" />
							<p:commandLink value="Show Details" action="#{cCookerAction.showOrderDetail(order)}"/>
						</h:panelGrid>
					</p:dataList>
					<p:commandButton value="Prepared" action="#{cCookerAction.approve()}" update="myForm" />
				</h:form>
			</pm:content>
		</pm:view>
	</pm:page>
</f:view>